@import "../../css/colors.css";
@import "../../css/units.css";

.editor-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: calc(2 * $space);
}

.row {
    display: flex;
    flex-direction: row;
    align-items: center;
}

[dir="rtl"] .row-reverse {
    flex-direction: row-reverse;
}

.row + .row {
    margin-top: calc(2 * $space);
}

.input-group {
    display: flex;
    flex-direction: row;
}

[dir="ltr"] .input-group + .input-group {
    margin-left: calc(2 * $space);
}

[dir="rtl"] .input-group + .input-group {
    margin-right: calc(2 * $space);
}

[dir="ltr"] .input-group {
    padding-right: calc(2 * $space);
    border-right: 1px dashed $ui-black-transparent;
}

[dir="rtl"] .input-group {
    padding-left: calc(2 * $space);
    border-left: 1px dashed $ui-black-transparent;
}

[dir="rtl"] .row-reverse > .input-group {
    padding-left: 0;
    padding-right: calc(2 * $space);
    border-left: none;
    border-right: 1px dashed $ui-black-transparent;
}

.waveform-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;

    position: relative;

    background: hsla(300, 53%, 60%, 0.15);
    border: 1px solid $ui-black-transparent;
    border-radius: 5px;
    padding: 3px;
}

$border-radius: 0.25rem;

.button {
    height: 2rem;
    padding: 0.35rem;
    outline: none;
    background: white;
    border-radius: $border-radius;
    border: 1px solid $ui-black-transparent;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
    user-select: none;
    margin: 0px;
}

.button > img {
    flex-grow: 1;
    max-width: 100%;
    max-height: 100%;
    min-width: 1.25rem;
}

.round-button {
    height: 3rem;
    width: 3rem;
    outline: none;
    background: white;
    border-radius: 100%;
    border: 1px solid $ui-black-transparent;
    cursor: pointer;
    padding: 0.75rem;
    user-select: none;
}

.round-button > img {
    flex-grow: 1;
    max-width: 100%;
    max-height: 100%;
    /*min-width: 1.5rem;*/
}

[dir="rtl"] .undo-icon, [dir="rtl"] .redo-icon {
    transform: scaleX(-1);
}

.trim-button {
    display: flex;
    align-items: center;
    color: $text-primary;
    font-size: 0.625rem;
    user-select: none;
}

[dir="ltr"] .trim-button {
    margin-left: 1rem;
}

[dir="rtl"] .trim-button {
    margin-right: 1rem;
}

.trim-button > img {
    width: 1.25rem;
    margin-bottom: -0.375rem;
}

.effect-button {
    flex-basis: 60px;
    color: $text-primary;
    font-size: 0.625rem;
    user-select: none;
}

.effect-button + .effect-button {
    margin: 0;
}

.effect-button img {
    width: 1.25rem;
    height: 1.25rem;
    margin-bottom: -0.375rem;
}

/* mirror the louder/softer speaker icons when rtl */
[dir="rtl"] .effect-button:nth-of-type(6) img {
    transform: scaleX(-1);
}

[dir="rtl"] .effect-button:nth-of-type(7) img {
    transform: scaleX(-1);
}

[dir="ltr"] .button-group {
    margin-left: 1rem;
}

[dir="rtl"] .button-group {
    margin-right: 1rem;
}

.button-group .button {
    border-radius: 0;
}

[dir="ltr"] .button-group .button {
    border-left: none;
}
[dir="rtl"] .button-group .button {
    border-right: none;
}

[dir="ltr"] .button-group .button:last-of-type {
    border-top-right-radius: $border-radius;
    border-bottom-right-radius: $border-radius;
}

[dir="ltr"] .button-group .button:first-of-type {
    border-left: 1px solid $ui-black-transparent;
    border-top-left-radius: $border-radius;
    border-bottom-left-radius: $border-radius;
}

[dir="rtl"] .button-group .button:last-of-type {
    border-top-left-radius: $border-radius;
    border-bottom-left-radius: $border-radius;
}

[dir="rtl"] .button-group .button:first-of-type {
    border-right: 1px solid $ui-black-transparent;
    border-top-right-radius: $border-radius;
    border-bottom-right-radius: $border-radius;
}

.button:disabled > img {
    opacity: 0.25;
}
